/**
 * Created by chenkeliang on 2017/4/20.
 */
const webpack = require('webpack')
var path = require("path");
var htmlPlugin = require('html-webpack-plugin');

module.exports = {
    entry:{
        index:[
            'webpack-dev-server/client?http://localhost:7000',
            'webpack/hot/dev-server',
            './contents/index.js'
        ]
    },
    output:{
        path: path.resolve(__dirname, "builds"),
        publicPath: "/builds/",
        filename: "bundle.js"
    },
    plugins:[
        new htmlPlugin({
            filename:__dirname+'/builds/index.html',
            template:'./index.html'
        }),
        new webpack.HotModuleReplacementPlugin()
    ],
    devServer:{
        contentBase:'./builds',
        inline:true
    }
}